// 查询队列
import {findProducerCtxRequest} from "./devil";

export interface QueryQueuePage {
  page: number
  size: number
  req: {
    queueName: string
    startTime?: number | null
    endTime?: number | null
  }
}

export interface DelayQueuePage {
  page: number
  size: number
  name: string
}


// 方式消息
export interface SendMessageReq {
  content: string
  queueName: string
}

// 分页查询队列消息返回类型
export interface PageDataQueue {
  size: number
  page: number
  total: number
  pageCount: number
  data: PageDataData[]
}

// 分页查询队列消息返回类型 - 消费者
export interface PageCustomerDataQueue {
  size: number
  page: number
  total: number
  pageCount: number
  data: PageCustomerData[]
}

export interface PageCustomerData {
  id: string
  queueName: string
  message: string
  createTime: number
  endTime: number
}

export interface PageDelayDataQueue {
  size: number
  page: number
  total: number
  pageCount: number
  data: PageDelayData[]
}

export interface PageDelayData {
  id: string
  queueName: string
  message: string
  createTime: number
  delayTime: number
}


export interface PageDataData {
  id: string
  queueName: string
  message: string
  createTime: string
}

export interface ProducerCtx {
  localAddress: string
  createTime: number
}

export interface CustomerCtx {
  name: string
  localAddress: string
  queueName: string
  createTime: number
}

export interface SubscribeCtx {
  localAddress: string
  queueName: string
  createTime: number
  num: number
  time: number
}

